<!-- 点击后会跳转到登录页的蒙版，用来在用户点击页面时跳转到登录页 -->
<template>
  <div
    class="container"
    @click="onClick"
  />
</template>

<script setup lang="ts">
import { useUser } from '@/stores/user';
import { navigateTo } from '@/utils/navigate';
const user = useUser();
const { checkToken } = user;
const onClick = () => {
  checkToken();
  if(user.isLogin) return;
  navigateTo('login');
}

</script>

<style scoped lang="scss">
.container{
  position: absolute;
  top: 0;
  left: 0;
  z-index: 97;

  width: 100%;
  height: 100%;

  background-color: rgb(0 0 0 / 0%);
}
</style>
